home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / modern.g < prev    next >
Text File  |  1995-05-04  |  3KB  |  197 lines

  1. (game-module "modern"
  2.   (title "Modern Times")
  3.   (blurb "Economics and politics of today's world")
  4.   (variants (see-all true))
  5.   )
  6.  
  7. (unit-type engrs (image-name "engineers"))
  8.  
  9. (unit-type cargo-ship (image-name "ap"))
  10.  
  11. (unit-type farm (image-name "farm"))
  12. (unit-type oil-field (image-name "oil-derrick"))
  13. (unit-type oil-platform (image-name "oil-derrick"))
  14.  
  15. (unit-type base (image-name "airbase"))
  16. (unit-type port (image-name "port"))
  17. (unit-type town (image-name "town20"))
  18. (unit-type city (image-name "city20"))
  19.  
  20. (define cities (town city))
  21.  
  22. (define places (farm oil-field oil-platform base port town city))
  23.  
  24. (material-type food)
  25. (material-type oil)
  26. (material-type iron)
  27. (material-type people)
  28.  
  29. (include "stdterr")
  30.  
  31. (define water (sea shallows river))
  32.  
  33. ;;; Static relationships.
  34.  
  35. (table unit-capacity-x
  36.   (cities engrs 16)
  37.   (city oil-field 1)
  38.   )
  39.  
  40. (table unit-storage-x
  41.   (farm food 100)
  42.   (cities food 900)
  43.   (u* oil 10)
  44.   (cities oil 400)
  45.   )
  46.  
  47. (table vanishes-on
  48.   (places water true)
  49.   (oil-platform shallows false)
  50.   )
  51.  
  52. (table unit-size-in-terrain
  53.   (u* t* 1)
  54.   (farm t* 4)
  55.   (oil-field t* 4)
  56.   (town t* 4)
  57.   (city t* 16)
  58.   )
  59.  
  60. (add t* capacity 16)
  61.  
  62. (table terrain-storage-x
  63.   (t* oil 100)
  64.   )
  65.  
  66. ;;; Actions.
  67.  
  68. (add engrs acp-per-turn 1)
  69.  
  70. (add cities acp-per-turn 1)
  71.  
  72. ;;; Movement.
  73.  
  74. (add places speed 0)
  75.  
  76. ;;; Construction.
  77.  
  78. (add engrs cp 2)
  79.  
  80. (add farm cp 48)
  81.  
  82. (add oil-field cp 48)
  83.  
  84. (add oil-platform cp 144)
  85.  
  86. (table acp-to-create
  87.   (engrs (farm oil-field oil-platform) 1)
  88.   (cities engrs 1)
  89.   (city oil-field 1)
  90.   )
  91.  
  92. (table cp-on-creation
  93.   (engrs (farm oil-field oil-platform) 3)
  94.   (cities engrs 1)
  95.   (city oil-field 1)
  96.   )
  97.  
  98. (table create-range
  99.   (engrs oil-platform 1)
  100.   (city oil-field 2)
  101.   )
  102.  
  103. (table acp-to-build
  104.   (engrs (farm oil-field oil-platform) 1)
  105.   (cities engrs 1)
  106.   (city oil-field 1)
  107.   )
  108.  
  109. (table cp-per-build
  110.   (engrs (farm oil-field oil-platform) 3)
  111.   (cities engrs 1)
  112.   (city oil-field 1)
  113.   )
  114.  
  115. (table build-range
  116.   (city oil-field 2)
  117.   )
  118.  
  119. ;;; Automatic production.
  120.  
  121. (table base-production
  122.   ((oil-field oil-platform city) oil (20 20 10))
  123.   )
  124.  
  125. (table base-consumption
  126.   (u* food 1)
  127.   ((town city) food (2 10))
  128.   (u* oil 1)
  129.   ((town city) oil (2 10))
  130.   )
  131.  
  132. (table hp-per-starve
  133.   (u* food 1.00)
  134.   (u* oil 1.00)
  135.   )
  136.  
  137. (table out-length
  138.   ((oil-field oil-platform) oil 5)
  139.   )
  140.  
  141. (table in-length
  142.   (farm oil 5)
  143.   (cities oil 5)
  144.   )
  145.  
  146. ;;; Terrain alteration.
  147.  
  148. (table acp-to-add-terrain
  149.   (engrs road 1)
  150.   )
  151.  
  152. (table acp-to-remove-terrain
  153.   (engrs road 1)
  154.   )
  155.  
  156. ;;; Initial random setup.
  157.  
  158. (add city start-with 1)
  159. (add town start-with 5)
  160. (add farm start-with 10)
  161. (set country-radius-min 3)
  162. (set country-separation-min 16)
  163. (set country-separation-max 48)
  164. ; Try to get countries on the coast.
  165. (add (sea plains) country-terrain-min (1 4))
  166.  
  167. (table favored-terrain
  168.   (u* t* 0)
  169.   (farm plains 100)
  170.   (cities plains 100)
  171.   (cities land-t* 20)
  172.   (cities plains 40)
  173.   )
  174.  
  175. (table independent-density (cities plains 100))
  176.  
  177. (add land-t* country-people-chance 90)
  178. (add plains country-people-chance 100)
  179.  
  180. (add land-t* independent-people-chance 50)
  181.  
  182. (table unit-initial-supply
  183.   (u* m* 9999)
  184.   (cities oil 400)
  185.   )
  186.  
  187. (table terrain-initial-supply
  188.   (t* oil 10d100)
  189.   )
  190.  
  191. (game-module (design-notes (
  192.   "A detailed game of modern problems."
  193.   "Scale is 1 week/turn, 50km/cell."
  194.   ""
  195.   "(should have a many-nukes-available option)"
  196.   )))
  197.